package com.zho.common.fileserver;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

public class FileServerHelper implements InitializingBean, DisposableBean {
    
    public  FileServerBean resourceFileServer;

    public enum FileType {
        JPG("jpg"), GIF("gif"), PDF("pdf"), DOC("doc"), DOCX("docx"), XLS("xls"), XLSX("xlsx"), CSV("csv"), HTM("htm"), HTML("html"), TXT("txt"), ZIP("zip"), RAR("rar"), VELOCITY("vm");

        final String ext;

        FileType(String _ext) {
            this.ext = _ext;
        }

        public String type() {
            return this.ext;
        }

        public String toString() {
            return this.ext;
        }
    }

    /*
     * (non-Javadoc)
     * 
     * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
     */
    public void afterPropertiesSet() throws Exception {
    }

    /*
     * (non-Javadoc)
     * 
     * @see org.springframework.beans.factory.DisposableBean#destroy()
     */
    public void destroy() throws Exception {
    }

	/**
	 * @return the resourceFileServer
	 */
	public FileServerBean getResourceFileServer() {
		return resourceFileServer;
	}

	/**
	 * @param resourceFileServer the resourceFileServer to set
	 */
	public void setResourceFileServer(FileServerBean resourceFileServer) {
		this.resourceFileServer = resourceFileServer;
	}
}
